//  Created by <Omar MALAGOUEN>

//  Copyright 2011 All rights reserved.
//

/*
 * Various utilities for command line tools
 * Copyright (c) 2000-2010 Omar Malagouen
 *
 * This file is part of Kakola.
 *
 * Kakola is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * Kakola is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with Kakola; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#ifndef COMMON_H
#define COMMON_H

#include <QThread>

// IMPORTANT Don't forget to update VERSION in case of change
#define VERSION "0.2.1"


#define MAXCPU  8
#define maxDescrSize 120
#define doneWithSuccess 0
#define inProgress 1
#define doneWithError 2
#define done 3
#define notStarted 4
#define cancelled 5
#define toBeIgnored 6
#define waitStatus 7


//#define descPrefix "          "
#define descPrefixConst "     - "


class CSleeper : public QThread
{
public:
    static void sleep(unsigned long secs) {QThread::sleep(secs);}
    static void msleep(unsigned long msecs) {QThread::msleep(msecs);}
    static void usleep(unsigned long usecs) {QThread::usleep(usecs);}
};


QString getVersion();
QString getProfileDir();

#endif // COMMON_H
